package de.lot.action;

import de.lot.model.Student;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.framework.EntityHome;

/**
 * Class to interact between UI and back-end for Student component
 *
 * @author Stefan Kohler <kohler.stefan@gmail.com>
 */
@Name("studentHome")
public class StudentHome extends EntityHome<Student> {

    public void setStudentId(Long id) {
        setId(id);
    }

    public Long getStudentId() {
        return (Long) getId();
    }

    public Student getDefinedInstance() {
        return isIdDefined() ? getInstance() : null;
    }

    @Override
    protected Student createInstance() {
        Student student = new Student();
        return student;
    }
}
